package Model;

import java.sql.Timestamp;

public class UserFinancialProduct {
    private Integer id; // 用户理财产品关联ID
    private Integer userId; // 用户ID
    private Integer productId; // 理财产品ID
    private Double purchaseAmount; // 购买金额
    private Timestamp purchaseDate; // 购买日期
    private String status; // 产品状态 ('ACTIVE', 'COMPLETED', 'CANCELLED')
    private Double expectedEarnings; // 预期收益

    private FinancialProduct product; // 理财产品对象

    // 默认构造函数
    public UserFinancialProduct() {}

    // 带参数的构造函数
    public UserFinancialProduct(Integer id, Integer userId, Integer productId, Double purchaseAmount, Timestamp purchaseDate, String status, Double expectedEarnings, FinancialProduct product) {
        this.id = id;
        this.userId = userId;
        this.productId = productId;
        this.purchaseAmount = purchaseAmount;
        this.purchaseDate = purchaseDate;
        this.status = status;
        this.expectedEarnings = expectedEarnings;
        this.product = product;
    }

    // Getter 和 Setter 方法

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Double getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(Double purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public Timestamp getPurchaseDate() {
        return purchaseDate;
    }

    public void setPurchaseDate(Timestamp purchaseDate) {
        this.purchaseDate = purchaseDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Double getExpectedEarnings() {
        return expectedEarnings;
    }

    public void setExpectedEarnings(Double expectedEarnings) {
        this.expectedEarnings = expectedEarnings;
    }

    public FinancialProduct getProduct() {
        return product;
    }

    public void setProduct(FinancialProduct product) {
        this.product = product;
    }
}
